USE [CodeStory]
GO
/****** Object:  Table [dbo].[T_UserInRole]    Script Date: 10/27/2007 13:09:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_UserInRole](
	[RoleID] [uniqueidentifier] NOT NULL,
	[UserID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_T_UserInRole] PRIMARY KEY CLUSTERED 
(
	[RoleID] ASC,
	[UserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[News_Categories]    Script Date: 10/27/2007 13:09:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[News_Categories](
	[CategoryID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_News_Categories_CategoryID]  DEFAULT (newid()),
	[CategoryName] [nvarchar](50) NOT NULL CONSTRAINT [DF_News_Categories_CategoryName]  DEFAULT (N''),
 CONSTRAINT [PK_News_Categories] PRIMARY KEY CLUSTERED 
(
	[CategoryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[News_Contents]    Script Date: 10/27/2007 13:09:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[News_Contents](
	[NewsID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_News_NewsContents_NewsID]  DEFAULT (newid()),
	[CategoryID] [uniqueidentifier] NOT NULL,
	[NewsTitle] [nvarchar](128) NOT NULL CONSTRAINT [DF_News_NewsContents_NewsTitle]  DEFAULT (N''),
	[Author] [nvarchar](50) NOT NULL,
	[PostDate] [datetime] NOT NULL CONSTRAINT [DF_News_NewsContents_PostDate]  DEFAULT (getdate()),
	[NewsSummary] [nvarchar](512) NOT NULL CONSTRAINT [DF_News_NewsContents_NewsSummary]  DEFAULT (N''),
	[NewsContent] [nvarchar](max) NOT NULL CONSTRAINT [DF_News_NewsContents_NewsContent]  DEFAULT (N''),
 CONSTRAINT [PK_News_NewsContents] PRIMARY KEY CLUSTERED 
(
	[NewsID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Notes]    Script Date: 10/27/2007 13:09:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Notes](
	[NoteID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Notes_NoteID]  DEFAULT (newid()),
	[NoteTitle] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Notes_NoteTitle]  DEFAULT (N''),
	[NoteContent] [nvarchar](max) NOT NULL CONSTRAINT [DF_T_Notes_NoteContent]  DEFAULT (N''),
 CONSTRAINT [PK_T_Notes] PRIMARY KEY CLUSTERED 
(
	[NoteID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_RoleResource]    Script Date: 10/27/2007 13:09:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_RoleResource](
	[RoleID] [uniqueidentifier] NOT NULL,
	[ResourceID] [uniqueidentifier] NOT NULL,
	[Permission] [bigint] NOT NULL,
 CONSTRAINT [PK_T_RoleResource_1] PRIMARY KEY CLUSTERED 
(
	[RoleID] ASC,
	[ResourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_SiteSetting]    Script Date: 10/27/2007 13:09:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_SiteSetting](
	[ID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_SiteSetting_ID]  DEFAULT (newid()),
	[SettingName] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_SiteSetting_SettingName]  DEFAULT (N''),
	[RegisterKey] [nvarchar](512) NOT NULL CONSTRAINT [DF_T_SiteSetting_RegisterKey]  DEFAULT (N''),
	[RegisterValue] [nvarchar](1024) NOT NULL CONSTRAINT [DF_T_SiteSetting_RegisterValue]  DEFAULT (N''),
 CONSTRAINT [PK_T_SiteSetting] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Gallery_Photos]    Script Date: 10/27/2007 13:09:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Gallery_Photos](
	[PhotoID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_Photo_Images_ImageID]  DEFAULT (newid()),
	[FolderID] [uniqueidentifier] NOT NULL,
	[PhotoPath] [nvarchar](1024) NOT NULL CONSTRAINT [DF_Photo_Images_ImagePath]  DEFAULT (N''),
	[Comment] [nvarchar](1024) NOT NULL CONSTRAINT [DF_Photo_Images_Comment]  DEFAULT (N''),
 CONSTRAINT [PK_Photo_Images] PRIMARY KEY CLUSTERED 
(
	[PhotoID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Layouts]    Script Date: 10/27/2007 13:09:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Layouts](
	[LayoutID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Layouts_LayoutID]  DEFAULT (newid()),
	[LayoutName] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Layouts_LayoutName]  DEFAULT (N''),
	[FriendlyLayoutName] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Layouts_FriendlyLayoutName]  DEFAULT (N''),
	[ImageFile] [nvarchar](512) NOT NULL CONSTRAINT [DF_T_Layouts_ImageFile]  DEFAULT (N''),
	[LayouTemplate] [nvarchar](max) NOT NULL CONSTRAINT [DF_T_Layouts_LayouTemplate]  DEFAULT (N''),
 CONSTRAINT [PK_T_Layouts_1] PRIMARY KEY CLUSTERED 
(
	[LayoutID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Gallery_Folders]    Script Date: 10/27/2007 13:08:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Gallery_Folders](
	[FolderID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_Photo_Folders_FolderID]  DEFAULT (newid()),
	[UserID] [uniqueidentifier] NOT NULL,
	[FolderName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Photo_Folders_FolderName]  DEFAULT (N''),
	[CoverPhotoPath] [nvarchar](1024) NOT NULL CONSTRAINT [DF_Gallery_Folders_CoverPhotoPath]  DEFAULT (N''),
	[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_Photo_Folders_CreateDate]  DEFAULT (getdate()),
	[IsPub] [bit] NOT NULL CONSTRAINT [DF_Photo_Folders_IsPub]  DEFAULT ((1)),
 CONSTRAINT [PK_Photo_Folders] PRIMARY KEY CLUSTERED 
(
	[FolderID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Modules]    Script Date: 10/27/2007 13:09:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Modules](
	[ModuleID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Modules_ModuleID]  DEFAULT (newid()),
	[ModuleName] [nvarchar](128) NULL,
	[ModuleDescription] [nvarchar](512) NULL,
	[Author] [nvarchar](50) NULL,
	[Version] [nvarchar](50) NULL,
	[InstallDirectory] [nvarchar](2048) NULL,
 CONSTRAINT [PK_T_Modules] PRIMARY KEY CLUSTERED 
(
	[ModuleID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Gallery_Main]    Script Date: 10/27/2007 13:09:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Gallery_Main](
	[GalleryID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_Gallery_Main_GalleryID]  DEFAULT (newid()),
	[UserID] [uniqueidentifier] NOT NULL,
	[GalleryName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Gallery_Main_GalleryName]  DEFAULT (N''),
	[Description] [nvarchar](2048) NOT NULL CONSTRAINT [DF_Gallery_Main_Description]  DEFAULT (N''),
 CONSTRAINT [PK_Gallery_Main_1] PRIMARY KEY CLUSTERED 
(
	[GalleryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Pages]    Script Date: 10/27/2007 13:09:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Pages](
	[PageID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Tabs_TabID]  DEFAULT (newid()),
	[PageName] [nvarchar](128) NOT NULL,
	[Title] [nvarchar](512) NOT NULL CONSTRAINT [DF_T_Pages_Title]  DEFAULT (N''),
	[LayoutID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Pages_LayoutID]  DEFAULT ('00000000-0000-0000-0000-000000000000'),
	[Description] [nvarchar](512) NOT NULL CONSTRAINT [DF_T_Pages_Description]  DEFAULT (N''),
	[PageSetting] [nvarchar](max) NOT NULL CONSTRAINT [DF_T_Pages_PortletSetting]  DEFAULT (N''),
 CONSTRAINT [PK_T_Tabs] PRIMARY KEY CLUSTERED 
(
	[PageID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_PermissionDescriptor]    Script Date: 10/27/2007 13:09:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_PermissionDescriptor](
	[ID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_PermissionDescriptor_ID]  DEFAULT (newid()),
	[DescriptorName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_Name]  DEFAULT (N''),
	[DescriptorType] [nvarchar](512) NOT NULL CONSTRAINT [DF_T_PermissionDescriptor_DescriptorType]  DEFAULT (N''),
	[ResourceType] [nvarchar](64) NULL,
	[ActionType] [nvarchar](512) NOT NULL CONSTRAINT [DF_T_PermissionDescriptor_DescriptionList]  DEFAULT (N''),
 CONSTRAINT [PK_T_PermissionDescriptor] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_PortletNavigation]    Script Date: 10/27/2007 13:09:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_PortletNavigation](
	[NavigationName] [nvarchar](128) NOT NULL,
	[PageID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_T_PortletNavigation] PRIMARY KEY CLUSTERED 
(
	[NavigationName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Portlets]    Script Date: 10/27/2007 13:09:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Portlets](
	[PortletID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Portlets_PortletID]  DEFAULT (newid()),
	[ModuleID] [uniqueidentifier] NOT NULL,
	[PortletName] [nvarchar](128) NOT NULL CONSTRAINT [DF_T_Portlets_PortletName]  DEFAULT (N''),
	[PortletDescription] [nvarchar](256) NOT NULL CONSTRAINT [DF_T_Portlets_PortletDescription]  DEFAULT (N''),
	[PortletPath] [nvarchar](2048) NOT NULL CONSTRAINT [DF_T_Portlets_PortletPath]  DEFAULT (N''),
	[TimesLimited] [smallint] NOT NULL CONSTRAINT [DF_T_Portlets_TabTimesLimited]  DEFAULT ((-1)),
	[InstallNumber] [smallint] NOT NULL CONSTRAINT [DF_T_Portlets_InstallNumber]  DEFAULT ((0)),
 CONSTRAINT [PK_T_Portlets] PRIMARY KEY CLUSTERED 
(
	[PortletID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_PortletTemplates]    Script Date: 10/27/2007 13:09:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_PortletTemplates](
	[TemplateID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_PortletTemplates_TemplateID]  DEFAULT (newid()),
	[CodeName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table1_TemplateName]  DEFAULT (N''),
	[FriendlyName] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_PortletTemplates_FriendlyName]  DEFAULT (N''),
	[TemplateFilePath] [nvarchar](1024) NOT NULL CONSTRAINT [DF_T_PortletTemplates_FilePath]  DEFAULT (N''),
 CONSTRAINT [PK_T_PortletTemplates] PRIMARY KEY CLUSTERED 
(
	[TemplateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_T_PortletTemplates] UNIQUE NONCLUSTERED 
(
	[CodeName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Resources]    Script Date: 10/27/2007 13:09:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Resources](
	[ResourceID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Resources_ResourceID]  DEFAULT (newid()),
	[InnerResourceID] [nvarchar](512) NOT NULL CONSTRAINT [DF_T_Resources_ResourceValidateID]  DEFAULT (N''),
	[ParentResourceID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Resources_ParentResourceID]  DEFAULT (N'00000000-0000-0000-0000-000000000000'),
	[ResourceName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_ResourceName]  DEFAULT (N''),
	[Description] [nvarchar](512) NOT NULL CONSTRAINT [DF_T_Resources_Description]  DEFAULT (N''),
	[ResourceType] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Resources_ResourceType]  DEFAULT (N''),
 CONSTRAINT [PK_T_Resources] PRIMARY KEY CLUSTERED 
(
	[ResourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Roles]    Script Date: 10/27/2007 13:09:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Roles](
	[RoleID] [uniqueidentifier] NOT NULL,
	[RoleName] [nvarchar](50) NULL,
	[Description] [nvarchar](255) NULL,
 CONSTRAINT [PK_T_Roles] PRIMARY KEY CLUSTERED 
(
	[RoleID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_SiteMap]    Script Date: 10/27/2007 13:09:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_SiteMap](
	[NodeKey] [nvarchar](50) NOT NULL,
	[Url] [nvarchar](1024) NULL,
	[Title] [nvarchar](256) NULL,
	[Description] [nvarchar](256) NULL,
	[ParentNodeKey] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_SiteMap_ParentNodeKey]  DEFAULT (N''),
 CONSTRAINT [PK_T_SiteMap] PRIMARY KEY CLUSTERED 
(
	[NodeKey] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Users]    Script Date: 10/27/2007 13:09:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Users](
	[UserID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_Users_UserID]  DEFAULT (newid()),
	[UserName] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Users_UserName]  DEFAULT (N''),
	[LoweredUserName] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Users_LoweredUserName]  DEFAULT (N''),
	[Password] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Users_Password]  DEFAULT (N''),
	[PasswordQuestion] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Users_PasswordQuestion]  DEFAULT (N''),
	[PasswordAnswer] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_Users_PasswordAnswer]  DEFAULT (N''),
	[Email] [nvarchar](255) NOT NULL CONSTRAINT [DF_T_Users_Email]  DEFAULT (N''),
	[RegisterDate] [datetime] NOT NULL CONSTRAINT [DF_T_Users_RegisterDate]  DEFAULT (getdate()),
	[LastVisitedDate] [datetime] NOT NULL CONSTRAINT [DF_T_Users_LastVisitedDate]  DEFAULT (getdate()),
	[IsLocked] [bit] NOT NULL CONSTRAINT [DF_T_Users_IsLocked]  DEFAULT ((0)),
	[Property] [nvarchar](max) NOT NULL CONSTRAINT [DF_T_Users_Property]  DEFAULT (N''),
 CONSTRAINT [PK_T_Users] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_PagePortlets]    Script Date: 10/27/2007 13:09:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_PagePortlets](
	[PagePortletID] [uniqueidentifier] NOT NULL CONSTRAINT [DF_T_PagePortlets_PagePortletID]  DEFAULT (newid()),
	[PageID] [uniqueidentifier] NOT NULL,
	[PortletID] [uniqueidentifier] NOT NULL,
	[PortletTemplateName] [nvarchar](64) NOT NULL CONSTRAINT [DF_T_PagePortlets_PortletTemplateID]  DEFAULT (N''),
	[PaneName] [nvarchar](64) NOT NULL,
	[Align] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_PagePortlets_Align]  DEFAULT (N'left'),
	[VAlign] [nvarchar](50) NOT NULL CONSTRAINT [DF_T_PagePortlets_VAlign]  DEFAULT (N'top'),
	[InsertOrder] [int] NOT NULL CONSTRAINT [DF_T_PagePortlets_InsertOrder]  DEFAULT ((0)),
 CONSTRAINT [PK_T_PagePortlets_1] PRIMARY KEY CLUSTERED 
(
	[PagePortletID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
